<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
  <title>教师界面</title>
  <style>
    body {
      font-family: Arial, sans-serif;
      margin: 0;
      padding: 20px;
      background-color: #f5f5f5;
    }
    .header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 20px;
      padding-bottom: 10px;
      border-bottom: 1px solid #ddd;
    }
    .welcome {
      font-size: 18px;
      color: #333;
    }
    .logout-btn {
      padding: 5px 15px;
      background-color: #dc3545;
      color: white;
      border: none;
      border-radius: 4px;
      cursor: pointer;
      text-decoration: none;
    }
    .logout-btn:hover {
      background-color: #c82333;
    }
    .content {
      background-color: white;
      padding: 20px;
      border-radius: 5px;
      box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    }
    .user-info {
      display: flex;
      align-items: center;
      gap: 10px;
    }
    .user-type {
      background-color: #6c757d;
      color: white;
      padding: 2px 8px;
      border-radius: 10px;
      font-size: 0.8rem;
    }
    .card-container {
      display: flex;
      gap: 20px;
      margin-top: 20px;
    }
    .card {
      flex: 1;
      background: white;
      border-radius: 8px;
      padding: 20px;
      box-shadow: 0 2px 10px rgba(0,0,0,0.1);
      text-align: center;
    }
    .card h3 {
      margin-top: 0;
      color: #4361ee;
    }
  </style>
</head>
<body>
<div class="header">
  <h1>教师信息管理系统</h1>
  <div class="user-info">
    <span class="welcome">欢迎, ${username}</span>
    <span class="user-type">${userType}</span>
    <a href="${pageContext.request.contextPath}/user/logout" class="logout-btn">退出登录</a>
  </div>
</div>

<div class="content">
  <h2>我的课程</h2>

  <div class="card-container">
    <div class="card">
      <h3>课程管理</h3>
      <p>查看和管理您教授的课程</p>
<%--      <a href="/teachers/asdas">进入</a>--%>
      <a href="${pageContext.request.contextPath}/teachers/course">进入</a>
    </div>
    <div class="card">
      <h3>学生成绩</h3>
      <p>录入和管理学生成绩</p>
      <a href="/teacher/grades">进入</a>

    </div>
    <div class="card">
      <h3>个人信息</h3>
      <p>查看和修改个人信息</p>
        <a href="${pageContext.request.contextPath}/teacher/info">进入</a>
    </div>
  </div>
</div>
</body>
</html>
